package com.example.schedule;

import com.example.service.IShopExtService;
import com.example.service.IShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ScheduleService {

    @Autowired
    private IShopExtService serviceService;

//    @Scheduled(cron = "0/5 * * * * *")
    public void test() {
        log.info("========>使用 cron {}", System.currentTimeMillis());
    }

    @Scheduled(cron = "0/100 * * * * *")
    public void getGeoCron() {
        serviceService.getShopGeoBatch();
    }

}
